// wtkapplication.hpp
//

#ifndef _WTKAPPLICATION_HPP
#define _WTKAPPLICATION_HPP

#include "wtk/wtkbase.hpp"
#include "wtk/wtkwm.hpp"

namespace wtk
{
  class Display;



  // Application
  //
  class WTK_API Application
  {
    friend Display;
    
  public:
    static Application & WTK_API get_current_application ();
    
    Application ();
    ~Application ();

    void enable_application_layers ( const std::vector<std::string> &layer_name );
    const std::vector<std::string> &get_enabled_application_layers ();

    const std::filesystem::path &get_data_dir () const { return data_dir; }
    const std::filesystem::path &get_fonts_dir () const { return fonts_dir; }
    
  private:
    static Application * WTK_API current_application;

    std::filesystem::path data_dir;
    std::filesystem::path fonts_dir;
    
    wgl::Instance wgl_instance;
    WM wm;

    void register_display ( Display &display );
    void unregister_display ( Display &display );
  };
}

#endif
